<?php
namespace App\Http\Service\Account;


use App\Http\Service\Basic\BasicService;
use Config;

class AccountService extends BasicService
{

    //构造函数
    function __construct()
    {
        parent::__construct();
    }

    /**
     * 用户列表
     */
    public function getAccountList($where)
    {
        return $this->curlLogic->callWebServer(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.get_account_list'), json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), 'post');
    }

    /**
     * 用户账号冻结
     */
    public function doAccountForbidden($where)
    {
        return $this->curlLogic->callWebServer(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.froze_account'), json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), 'post');
    }

    /**
     * 用户账号解冻
     */
    public function doAccountThaw($where)
    {
        return $this->curlLogic->callWebServer(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.thaw_account'), json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), 'post');
    }

    /**
     * 用户添加
     */
    public function doAccountAdd($where)
    {
        return $this->curlLogic->callWebServer(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.add_account'), json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), 'post');

    }

    /**
     * 用户充值
     */
    public function doAccountRecharge($where)
    {

//      dd(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.acc_recharge'), json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE));
        return $this->curlLogic->callWebServer(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.acc_recharge'), json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), 'post');

    }

    /**
     * 会员流水号
     */
    public function AdminOrder($where)
    {

        return $this->curlLogic->callWebServer(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.admin_order'), json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), 'post');

    }

    /**
     * 用户详情
     */
    public function getAccdetail($where)
    {

        return $this->curlLogic->callWebServer(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.account_detail'), json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), 'post');

    }

    /**
     * 重置用户密码
     */
    public function resetPassword($where)
    {

        return $this->curlLogic->callWebServer(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.reset_acc_password'), json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), 'post');

    }

    /**
     * 用户时长套餐列表
     */
    public function getMemberSetMealTime($where)
    {

        return $this->curlLogic->callWebServer(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.get_time_pack_list'), json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), 'post');

    }

    /**
     * 用户包量套餐列表
     */
    public function getMemberSetMealNumber($where)
    {

        return $this->curlLogic->callWebServer(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.get_num_pack_list'), json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), 'post');

    }

    /**
     * 续费或加量
     */
    public function renewSetMeal($where)
    {

        return $this->curlLogic->callWebServer(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.renew_set_meal'), json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), 'post');

    }

    /**
     * 修改
     */
    public function updateSetMeal($where)
    {

//        dd(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.update_set_meal'), json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE));
        return $this->curlLogic->callWebServer(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.update_set_meal'), json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), 'post');

    }

    /**
     * 修改
     */
    public function addSetMeal($where)
    {

//        dd(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.add_set_meal'), json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE));
        return $this->curlLogic->callWebServer(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.add_set_meal'), json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), 'post');

    }

}